Skip to content

Conversation

@juleswg23
Copy link
Contributor

@juleswg23 juleswg23 commented Feb 11, 2026

Description

This PR makes embedding pre-releases of quarto into Connect (and vice versa) easier by allowing us to declare the version output Quarto should give, beyond the detected version. This makes it simpler to run Quarto on dev versions of Connect as we make staggered changes to Quarto email support, such as in #13882

closes #14021

---
title: email with image
format:
    email:
        email-version: 2
---

Some of the content in this document makes its way to the rendered
HTML and some of it is destined for a custom email message. The
`email` block customizes the subject and the body of the email
message, while the rendered HTML contains only this paragraph.


::: {.email}

::: {.subject}
Buy groceries
:::

![](image.png)

:::

By setting the above fields, even if Quarto detects that it is running inside an old version of Connect, it will output V2 style email metadata.

When rendered locally, I see V2 output metadata, despite having an old version of connect.

pandoc 
  to: html
  output-file: email-with-image.html
  standalone: true
  section-divs: true
  html-math-method: mathjax
  wrap: none
  default-image-extension: png
  variables: {}
  
metadata
  document-css: false
  link-citations: true
  date-format: long
  lang: en
  title: email with image
  email-version: 2
  
WARNING: Email format v2 is being forced via 'format.email.version: 2' in YAML. This overrides the Connect version detection.
Output created: email-with-image.html
image

Checklist

I have (if applicable):

  • filed a contributor agreement.
  • referenced the GitHub issue this PR closes
  • updated the appropriate changelog in the PR
  • ensured the present test suite passes
  • added new tests
  • created a separate documentation PR in Quarto's website repo and linked it to this PR

@posit-snyk-bot
Copy link
Collaborator

posit-snyk-bot commented Feb 11, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@juleswg23 juleswg23 marked this pull request as ready for review February 11, 2026 22:00
@cscheid
Copy link
Collaborator

cscheid commented Feb 12, 2026

Looks good. Could you run quarto dev-call build-artifacts from your branch and push to this branch the changes you'll see in the schema directory?

@juleswg23
Copy link
Contributor Author

juleswg23 commented Feb 12, 2026

Thanks @cscheid. I did notice the build step, but wasn't sure if I was meant to run it locally. I pushed all the changes it generated, but none were in the schema directory. Will revert it if that's not what you were looking for.

edit: I must have committed the wrong files.

@cscheid
Copy link
Collaborator

cscheid commented Feb 12, 2026

(sorry, I gave you the wrong paths. .../schema/... is where the schemas live, but those files are the ones that quarto-cli and the extension use to actually interpret and validate the YAML data)

This is strange. The error we're getting here seems (at least to me) to be unrelated. The files you've pushed are the ones I expected to see...

@cscheid
Copy link
Collaborator

cscheid commented Feb 12, 2026

I think Christophe just added the necessary changes to main; I wonder if a merge would solve it.

@juleswg23 juleswg23 force-pushed the feat-connect-version-override branch from 2ab92db to 94522b0 Compare February 12, 2026 20:23
@cscheid
Copy link
Collaborator

cscheid commented Feb 12, 2026

🎉 If this is working for you within Connect, I'm fine with merging!

@juleswg23
Copy link
Contributor Author

Super, let's merge!

It's working locally (where I don't have connect v2026.03 since it doesn't exist yet), so I'm as confident as I can be for now.

@cderv
Copy link
Collaborator

cderv commented Feb 13, 2026

I think Christophe just added the necessary changes to main; I wonder if a merge would solve it.

Yes sorry. Windows / linux stuff againt

Regarding conflict, a rebase is needed on main (or merging main in the branch) and resolving conflict by building schema artifacts again.

Also, is a changelog entry needed maybe for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

email: enable email-version field in header to override Connect version

4 participants